<script>
/*
 * @Author: wzh 
 * @Date: 2020-12-31 00:29:31 
 * @Last Modified by: 1521620993@qq.com
 * @Last Modified time: 2020-12-31 00:32:30
 */
</script>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>07-定位元素的宽高</title>
</head>
<body>
  <style>
    .box{
      height: 200px;
      background-color: magenta;
      position: relative;
    }
    .box div{
      background-color: red;
      left: 0;
      bottom: 0;
    }
    .item1{
      position: relative;
    }
    .item2{
      position: absolute;
    }
    .item3{
      position: fixed;
    }
  </style>
  <div class="box">
    <div class="item1">item1</div>
    <div class="item2">item2</div>
    <div class="item3">item3</div>
  </div>
</body>
</html>